home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
dev
/
lang
/
SmallEiffel.lha
/
SmallEiffel
/
bin_c
/
compile_to_c4.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-22
|
4KB
|
308 lines
/*
-- ANSI C code generated by :
-- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.79) --
-- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
-- Dominique COLNET and Suzanne COLLIN - colnet@loria.fr --
-- http://www.loria.fr/SmallEiffel --
*/
#include "compile_to_c.h"
T327 r327realloc(T327 C,T2 a1,T2 a2){
T327 R=NULL;
R=calloc(a2,sizeof(T0*));
r327copy_from(R,C,(a1)-(1));
return R;
}
void r327set_all_with(T327 C,T0* a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=(a1);
_i=(_i)-(1);
}
}
T2 r327fast_index_of(T327 C,T0* a1,T2 a2){
T2 R=0;
while (!(((R)>(a2))||((a1)==((void*)((C)[R]))))) {
R=(R)+(1);
}
return R;
}
void r327move(T327 C,T2 a1,T2 a2,T2 a3){
T2 _i=0;
/*[IF*/
if((a3)==(0)){
}
else if((a3)<(0)){
_i=a1;
while (!((_i)>(a2))) {
(C)[(_i)+(a3)]=((C)[_i]);
_i=(_i)+(1);
}
}
else{
_i=a2;
while (!((_i)<(a1))) {
(C)[(_i)+(a3)]=((C)[_i]);
_i=(_i)-(1);
}
}
/*FI]*/
}
void r327clear(T327 C,T2 a1,T2 a2){
T2 _i=0;
T0* _v=NULL;
_i=a1;
while (!((_i)>(a2))) {
(C)[_i]=(_v);
_i=(_i)+(1);
}
}
void r327copy_from(T327 C,T327 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T90 r90realloc(T90 C,T2 a1,T2 a2){
T90 R=NULL;
R=calloc(a2,sizeof(T0*));
r90copy_from(R,C,(a1)-(1));
return R;
}
void r90copy_from(T90 C,T90 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T186 r186realloc(T186 C,T2 a1,T2 a2){
T186 R=NULL;
R=calloc(a2,sizeof(T0*));
r186copy_from(R,C,(a1)-(1));
return R;
}
void r186set_all_with(T186 C,T0* a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=(a1);
_i=(_i)-(1);
}
}
void r186copy_from(T186 C,T186 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T319 r319realloc(T319 C,T2 a1,T2 a2){
T319 R=NULL;
R=calloc(a2,sizeof(T0*));
r319copy_from(R,C,(a1)-(1));
return R;
}
void r319copy_from(T319 C,T319 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T309 r309realloc(T309 C,T2 a1,T2 a2){
T309 R=NULL;
R=calloc(a2,sizeof(T0*));
r309copy_from(R,C,(a1)-(1));
return R;
}
void r309copy_from(T309 C,T309 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T224 r224realloc(T224 C,T2 a1,T2 a2){
T224 R=NULL;
R=calloc(a2,sizeof(T0*));
r224copy_from(R,C,(a1)-(1));
return R;
}
void r224clear_all(T224 C,T2 a1){
T2 _i=0;
T0* _v=NULL;
_i=a1;
while (!((_i)<(0))) {
(C)[_i]=(_v);
_i=(_i)-(1);
}
}
void r224copy_from(T224 C,T224 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T42 r42realloc(T42 C,T2 a1,T2 a2){
T42 R=NULL;
R=calloc(a2,sizeof(T0*));
r42copy_from(R,C,(a1)-(1));
return R;
}
void r42set_all_with(T42 C,T0* a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=(a1);
_i=(_i)-(1);
}
}
T6 r42equal_like(T0* a1,T0* a2){
T6 R=0;
/*[IF*/
/*AF*//*AF*/if((a1)==((void*)(a2))){
R=1;
}
else if(((a1)==((void*)(NULL)))||((a2)==((void*)(NULL)))){
}
else{
R=r7is_equal(((T7*)a1),a2);
}
/*FI]*/
return R;
}
T2 r42fast_index_of(T42 C,T0* a1,T2 a2){
T2 R=0;
while (!(((R)>(a2))||((a1)==((void*)((C)[R]))))) {
R=(R)+(1);
}
return R;
}
void r42copy_from(T42 C,T42 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T2 r42index_of(T42 C,T0* a1,T2 a2){
T2 R=0;
while (!(((R)>(a2))||(r42equal_like(a1,(C)[R])))) {
R=(R)+(1);
}
return R;
}
T81 r81realloc(T81 C,T2 a1,T2 a2){
T81 R=NULL;
R=calloc(a2,sizeof(T0*));
r81copy_from(R,C,(a1)-(1));
return R;
}
void r81copy_from(T81 C,T81 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T236 r236realloc(T236 C,T2 a1,T2 a2){
T236 R=NULL;
R=calloc(a2,sizeof(T0*));
r236copy_from(R,C,(a1)-(1));
return R;
}
void r236copy_from(T236 C,T236 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}
T229 r229realloc(T229 C,T2 a1,T2 a2){
T229 R=NULL;
R=calloc(a2,sizeof(T0*));
r229copy_from(R,C,(a1)-(1));
return R;
}
void r229copy_from(T229 C,T229 a1,T2 a2){
T2 _i=0;
_i=a2;
while (!((_i)<(0))) {
(C)[_i]=((a1)[_i]);
_i=(_i)-(1);
}
}